﻿#include "PixelShaders/AlphaTestPixelShader.h"

/////////////////////////////////////////////////////
// UAlphaTestPixelShader

UAlphaTestPixelShader::UAlphaTestPixelShader(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
{
	bDiscardPixel = true;
}

FLinearColor UAlphaTestPixelShader::RunPixelShader(const FVertexToPixelInterpolants& Pixel, bool& bDiscardCurPixel)
{
	if (Pixel.Color.A >= 1)
	{
		Discard(bDiscardCurPixel);
	}
	
	return Pixel.Color;
}

/////////////////////////////////////////////////////
